home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / motif21_dev.idb / usr / Motif-2.1 / include / Xm / NotebookP.h.z / NotebookP.h
C/C++ Source or Header  |  2002-10-15  |  8KB  |  200 lines

  1. /* $XConsortium: NotebookP.h /main/4 1995/07/15 20:53:46 drk $ */
  2. /*
  3.  *  @OSF_COPYRIGHT@
  4.  *  COPYRIGHT NOTICE
  5.  *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
  6.  *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
  7.  *  the full copyright text.
  8.  */
  9. /*
  10.  * HISTORY
  11.  */
  12. #ifndef _XmNotebookP_h
  13. #define _XmNotebookP_h
  14.  
  15. #include <Xm/XmP.h>
  16. #include <Xm/ManagerP.h>
  17. #include <Xm/ScrollFrameT.h>
  18. #include <Xm/Notebook.h>
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. /* Notebook's constraint info. fields */
  25. typedef struct _XmNotebookConstraintPart
  26. {
  27.     /* resources */
  28.     int page_number;            /* page number */
  29.     unsigned char child_type;        /* notebook child type */
  30.     Boolean resizable;            /* is this child resizable? */
  31.  
  32.     /* private variables */
  33.     Boolean active;            /* True if the child is active */
  34.  
  35. #ifdef _SGIMOTIF
  36.     XtPointer    _SG_vendorExtension;
  37. #endif
  38.  
  39. } XmNotebookConstraintPart, *XmNotebookConstraint;
  40.  
  41. typedef struct _XmNotebookConstraintRec
  42. {
  43.     XmManagerConstraintPart manager;
  44.     XmNotebookConstraintPart notebook;
  45. } XmNotebookConstraintRec, *XmNotebookConstraintPtr;
  46.  
  47.  
  48. /* New fields for the Notebook widget class record */
  49. typedef struct _XmNotebookClassPart
  50. {
  51.     XtPointer extension;
  52.  
  53. #ifdef _SGIMOTIF
  54.     XtPointer    _SG_vendorExtension;
  55. #endif
  56.  
  57. } XmNotebookClassPart;
  58.  
  59.  
  60. /* Full class record declaration */
  61. typedef struct _NotebookClassRec
  62. {
  63.     CoreClassPart core_class;
  64.     CompositeClassPart composite_class;
  65.     ConstraintClassPart constraint_class;
  66.     XmManagerClassPart manager_class;
  67.     XmNotebookClassPart    notebook_class;
  68. } XmNotebookClassRec;
  69.  
  70. externalref XmNotebookClassRec xmNotebookClassRec;
  71.  
  72.  
  73. /* New fields for the Notebook widget instance record */
  74. typedef struct _XmNotebookPart
  75. {
  76.     /* resources */
  77.     int current_page_number;        /* the current page number */
  78.     int first_page_number;        /* the first page number */
  79.     int last_page_number;        /* the last page number */
  80.     unsigned char orientation;        /* notebook orientation */
  81.     unsigned char back_page_pos;    /* position of back pages */
  82.     Cardinal back_page_number;        /* the of back page lines */
  83.     Dimension back_page_size;        /* the thickness of back pages */
  84.     Pixel back_page_foreground;         /* foreground color for bk pgs */
  85.     Pixel back_page_background;         /* background color for bk pgs */
  86.     Pixel frame_background;        /* background color for frame */
  87.     unsigned char binding_type;        /* binding type */
  88.     Pixmap binding_pixmap;        /* pixmap for the binding */
  89.     Pixmap spiral_pixmap;        /* pixmap for the spiral binding */
  90.     Dimension binding_width;        /* the width of the binding */
  91.     Dimension margin_width;        /* horizontal margin between widgets */
  92.     Dimension margin_height;        /* vertical margin between widgets */
  93.     Dimension major_spacing;        /* gap between major tabs */
  94.     Dimension minor_spacing;        /* gap between minor tabs */
  95.     Dimension shadow_thickness;        /* notebook frame shadow thickness */
  96.     XtCallbackList page_change_callback;/* the page change callback */
  97.  
  98.     /* child widgets */
  99.     Widget scroller;            /* the page scroller widget */
  100.     Widget scroller_child;        /* TextF child of def page scroller */
  101.     Widget next_major;            /* next major tab scroll button */
  102.     Widget prev_major;            /* prev major tab scroll button */
  103.     Widget next_minor;            /* next minor tab scroll button */
  104.     Widget prev_minor;            /* prev minor tab scroll button */
  105.  
  106.     /* preferred children sizes */
  107.     Dimension real_binding_width;    /* real binding width */
  108.     Dimension real_back_page_number;    /* real back page number */
  109.     Dimension page_width;        /* width of page widgets */
  110.     Dimension page_height;        /* height of page widgets */
  111.     Dimension status_width;        /* width of the status areas */
  112.     Dimension status_height;        /* height of the status  areas */
  113.     Dimension major_width;        /* width of major tabs */
  114.     Dimension major_height;        /* height of major tabs */
  115.     Dimension minor_width;        /* width of minor tabs */
  116.     Dimension minor_height;        /* height of minor tabs */
  117.     Dimension scroller_width;        /* width of the page scroller */
  118.     Dimension scroller_height;        /* height of the page scroller */
  119.     Dimension major_scroller_width;    /* width of major scrollers */
  120.     Dimension major_scroller_height;    /* height of major scroller */
  121.     Dimension minor_scroller_width;    /* width of minor scrollers */
  122.     Dimension minor_scroller_height;    /* height of minor scrollers */
  123.     Dimension frame_width;        /* width of the frame */
  124.     Dimension frame_height;        /* height of the frame */
  125.  
  126.     /* for layouting tabs */
  127.     Widget first_major;            /* the first major tab */
  128.     Widget old_top_major;        /* the old top major tab */
  129.     Widget top_major;            /* the top major tab */
  130.     Widget last_major;            /* the last major tab */
  131.     Widget first_minor;            /* the first minor tab */
  132.     Widget old_top_minor;        /* the old top minor tab */
  133.     Widget top_minor;            /* the top minor tab */
  134.     Widget last_minor;            /* the last minor tab */
  135.     Widget constraint_child;        /* changing geom during ConstraintSV */
  136.  
  137.     /* shadow thickness state for current page major and minor tab */
  138.     Dimension major_shadow_thickness;    /* joined major tab shadow thickness */
  139.     Dimension minor_shadow_thickness;    /* joined minor tab shadow thickness */
  140.     Widget major_shadow_child;        /* saved shadow thickness tab */
  141.     Widget minor_shadow_child;        /* saved shadow thickness tab */
  142.     Boolean in_setshadow;        /* setting tab shadow thickness */
  143.  
  144.     /* extra position information */
  145.     unsigned char major_pos;        /* position of major tabs */
  146.     unsigned char minor_pos;        /* position of minor tabs */
  147.     unsigned char binding_pos;        /* binding position */
  148.  
  149.     /* other misc. variables */
  150.     unsigned char which_tab;        /* currently active tab type */
  151.     int last_alloc_num;            /* lastly allocated page number */
  152.     unsigned char scroller_status;    /* status of the page scroller */
  153.     unsigned short need_scroller;    /* need for tab scrollers */
  154.     Boolean dynamic_last_page_num;    /* True if using dynamic last page# */
  155.     Boolean in_callback;        /* True if processing a callback */
  156.     GC back_page_gc;                    /* GC for drawing backpages */
  157.     GC frame_gc;            /* GC for drawing frame */
  158.     GC binding_gc;                      /* GC for drawing binding */
  159.     GC foreground_gc;                   /* GC for drawing foreground */
  160.     GC background_gc;                   /* GC for drawing background */
  161.  
  162.     Boolean first_change_managed;    /* flags 1st call to ChangeManaged */
  163.     XmScrollFrameData scroll_frame_data; /* data for ScrollFrame trait */
  164.  
  165. #ifdef _SGIMOTIF
  166.     XtPointer    _SG_vendorExtension;
  167. #endif
  168.  
  169. } XmNotebookPart;
  170.  
  171.  
  172. /* Full instance record declaration */
  173. typedef struct _XmNotebookRec
  174. {
  175.     CorePart core;
  176.     CompositePart composite;
  177.     ConstraintPart constraint;
  178.     XmManagerPart manager;
  179.     XmNotebookPart notebook;
  180. } XmNotebookRec;
  181.  
  182.  
  183. /******************************************************************************
  184.  *                                                                            *
  185.  *                         constants & useful macros                          *
  186.  *                                                                            *
  187.  ******************************************************************************/
  188.  
  189. /* internal child types, must not conflict with XmRNBChildType enum */
  190. #define XmMAJOR_TAB_SCROLLER            12
  191. #define XmMINOR_TAB_SCROLLER            13
  192. #define XmTAB_SCROLLER                  14
  193.  
  194. #ifdef __cplusplus
  195. }
  196. #endif
  197.  
  198. #endif /* _XmNotebookP_h */
  199.  
  200.